<html>
<head>
    <title>用户管理</title>

    <ex-section id="CSS">
        <style>
            #leftArea {
                min-height: 500px;
                overflow: auto;
                margin-left: 10px;
            }

            #rightArea {
                min-height: 500px;
                overflow: auto;
                margin-left: 10px;
            }
        </style>
    </ex-section>
</head>
<body>

<div>
    <!-- 查询条件 -->
    <div class="row">
        <div class="col-sm-12">
            <div class="form-inline">
                <div class="form-group">
                    <label class="control-label">姓名：</label>
                    <input placeholder="姓名" id="fullNameSearch" class="form-control">
                </div>
                <div class="form-group">
                    <label class="control-label">用户名：</label>
                    <input placeholder="用户名" id="usernameSearch" class="form-control">
                </div>
            </div>
            <br>
        </div>
    </div>

    <!-- 工具栏 -->
    <div class="row">
        <div class="col-sm-12">
            <div class="pull-left">
                <button class="btn btn-sm btn-primary" id="addBtn">
                    <i class="fa fa-plus"></i> 添加
                </button>
                <button class="btn btn-sm btn-success" id="modifyBtn">
                    <i class="fa fa-file-text-o"></i> 修改
                </button>
                <button class="btn btn-sm btn-danger" id="delBtn">
                    <i class="fa fa-trash-o"></i> 删除
                </button>
                <button class="btn btn-sm btn-danger" id="restPwdBtn">
                    <i class="fa fa-trash-o"></i> 重置密码
                </button>
            </div>
            <div class="pull-right">
                <button class="btn btn-sm btn-info" id="searchBtn">
                    <i class="fa fa-search"></i> 搜索
                </button>
            </div>
        </div>
    </div>

    <div class="row" style="margin-top: 10px;">
        <div id="leftArea" class="col-md-3">
            <div class="panel panel-grey" style="height: 500px;">
                <div class="panel-heading">
                    <h3 class="panel-title" style="text-align: center;">机构</h3>
                </div>
                <div class="panel-body">
                    <ul id="orgGroup" class="ztree"></ul>
                </div>
            </div>
        </div>

        <div class="col-md-1">
        </div>

        <div id="rightArea" class="col-md-8">
            <div class="panel panel-grey" style="height: 500px;">
                <div class="panel-heading">
                    <h3 class="panel-title" style="text-align: center">用户</h3>
                </div>
                <div class="panel-body">
                    <div id="mainGrid">
                        <table id="btTable" class="table table-condensed table-hover table-striped"></table>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div id="modal">
        <form class="form-horizontal">
            <input type="hidden" id="id"/>
            <div class="form-group">
                <div class="col-md-2 text-right">
                    <span><span style="color: red;">* </span>用户名</span>
                </div>
                <div class="col-md-4">
                    <input class="form-control" id="username" name="username">
                </div>
                <div class="col-md-2 text-right">
                    <span>姓名</span>
                </div>
                <div class="col-md-4">
                    <input class="form-control" id="fullName" name="fullName"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-md-2 text-right">
                    <span><span style="color: red;">* </span>所属组织</span>
                </div>
                <div class="col-md-10">
                    <input class="form-control" id="orgList" name="orgList">
                </div>
            </div>
            <div class="form-group">
                <div class="col-md-2 text-right">
                    <span>所属角色</span>
                </div>
                <div class="col-md-10">
                    <input class="form-control" id="roleList" name="roleList">
                </div>
            </div>
            <div class="form-group">
                <div class="col-md-2 text-right">
                    <span><span style="color: red;">* </span>排序</span>
                </div>
                <div class="col-md-4">
                    <input class="form-control tree" id="sort" name="sort">
                </div>
                <div class="col-md-2 text-right">
                    <span><span style="color: red;">* </span>性别</span>
                </div>
                <div class="col-md-4">
                    <select class="form-control" id="sex" name="sex"></select>
                </div>
            </div>
            <div class="form-group">
                <div class="col-md-2 text-right">
                    <span>Email</span>
                </div>
                <div class="col-md-4">
                    <input class="form-control" id="email" name="email"/>
                </div>
                <div class="col-md-2 text-right">
                    <span>生日</span>
                </div>
                <div class="col-md-4">
                    <div class="input-group date form_datetime">
                        <input class="form-control" id="birthday" name="birthday"/>
                        <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <div class="col-md-2 text-right">
                    <span>地址</span>
                </div>
                <div class="col-md-10">
                    <input class="form-control" id="address" name="address">
                </div>

            </div>
            <div class="form-group">
                <div class="col-md-2 text-right">
                    <span>备注</span>
                </div>
                <div class="col-md-10">
                    <textarea class="form-control" rows="5" id="remarks" name="remarks"></textarea>
                </div>
            </div>
        </form>
    </div>


</div>

<ex-section id="ScriptBody">
    <script type="text/javascript" src="${request.contextPath}/js/main/modules/sys/userList.js?v=<@spring.message 'js.version'/>"></script>
    <script type="text/javascript">
        pageLogic.initData = {
            modalParams: [
                {
                    width: 800,
                    height: 400,
                    title: "用户"
                }
            ],
            restUrlPrefix: "/sys/users",
            queryMsg: {
                fullName: "fullNameSearch",
                username: "usernameSearch"
            }
        };

    </script>
</ex-section>
</body>
</html>
